#ifndef _bitstream_hpp_
#define _bitstream_hpp_

/** \file bitstream.hpp
 *  \author Adrian Schweizer
 *  \created  $Sa 18 Aug 03:48:01 pm CEST 2007 schwadri@SchwadriComp.local$
 *  \modified $So 19 Aug 03:44:38 pm CEST 2007 schwadri@SchwadriComp.local$
 */

//FIXME: whytf is this here? i don't remember what i used that for
#include <boost/array.hpp>

//FIXME: proper way to configure endian swapping behaviour
// atm big endian is assumed as native end. and little endian has to do swapping
#ifdef __BIG_ENDIAN__
#define CORE_BITSTREAM_NATIVE_END
#endif

//FIXME: not implemented
//Arbitrary size, just picking something likely to be larger than most packets
//#define CORE_BITSTREAM_STACK_ALLOCATION_SIZE 256

#include "encoding/endian.hpp"
#include "basic_bitstream.hpp"
#include "detail/bitstream_std_impl.hpp"

/** \brief contains generic classes and tools for various tasks
 *
 */
namespace core {

    /** \brief  a bitstream
     *
     *  this is only a typedef of the basic_bitstream template. look at the documentation
     *  of \ref basic_bitstream for more info about the member methods.
     *  \note as of now this is the only complete implementation for the bitstream interface
     *
     *  \par TODO
     *  - more documentation
     *  - Usage examples
     *  - bit alignement control using stream manipulators
     *  - provide optional stack allocation for small streams
     *  - split the current stream implementation in a thin stream front end and a bit-buffer back-end just like
     *    normal iostreams do
     *
     */
    typedef basic_bitstream<detail::bitstream_std_impl<> > bitstream;
} // namespace core

#endif // _bitstream_hpp_
